package com.qiang.test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Scanner;

public class Demo03 {

    private static final Logger LOGGER = LoggerFactory.getLogger(Demo03.class);

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");

        try {
            String s = sc.nextLine();
            //LOGGER.warn("输入正确");
            System.out.println(Integer.parseInt(s));
        } catch (Exception e) {
            //e.printStackTrace();
            LOGGER.warn("输入错误");
        }

    }
}
